package com.vhall.component.controller.interactive.facade;


import com.vhall.component.entity.account.dto.IndexDto;
import com.vhall.component.entity.export.dto.AdminExportDocumentQueryCondition;
import com.vhall.component.entity.record.RecordEntityDTO;
import com.vhall.component.entity.room.RoomDocumentsEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author lsl
 * @since 2021/6/9 13:35
 */
@FeignClient(value = "DocumentInnerFacade", path = "/v4/inner/document")
public interface DocumentInnerFacade {

    /**
     * 查询文档是否存在
     *
     * @param ilId            房间id
     * @param recordEntityDTO 文档相关参数
     * @return 是否存在值
     */
    @GetMapping("/get-document-status-exist")
    Integer getDocumentStatusExist(@RequestParam("ilId") String ilId, @RequestBody RecordEntityDTO recordEntityDTO);

    /**
     * 获取数据条数
     *
     * @param beginTime
     * @return
     */
    @GetMapping("/getCounts")
    IndexDto getCount(String beginTime);

    /**
     * 针对admin导出计算总条数
     *
     * @param condition 查询条件
     * @return 总条数
     */
    @PostMapping("/count-for-admin-export")
    Integer countForAdminExport(@RequestBody AdminExportDocumentQueryCondition condition);

    /**
     * 根据文档id查询文档信息
     *
     * @param documentId 文档id
     * @param roomId     房间id
     * @return
     */
    @GetMapping("/getDocumentById")
    RoomDocumentsEntity getDocumentById(String documentId, String roomId);

}
